import request from '@/utils/request'

// 查询全国律师列列表
export function listLawlist(query) {
  return request({
    url: '/article/lawlist/list',
    method: 'get',
    params: query
  })
}

// 查询全国律师列详细
export function getLawlist(id) {
  return request({
    url: '/article/lawlist/' + id,
    method: 'get'
  })
}

// 新增全国律师列
export function addLawlist(data) {
  return request({
    url: '/article/lawlist',
    method: 'post',
    data: data
  })
}



// 采集
export function spiderPage() {
  return request({
    url: '/article/lawlist/spider' ,
    method: 'get'
  })
}

// 采集En
export function spiderPageEn() {
  return request({
    url: '/article/lawlist/spiderEn' ,
    method: 'get'
  })
}


// 修改全国律师列
export function updateLawlist(data) {
  return request({
    url: '/article/lawlist',
    method: 'put',
    data: data
  })
}

// 删除全国律师列
export function delLawlist(id) {
  return request({
    url: '/article/lawlist/' + id,
    method: 'delete'
  })
}

// 导出csv
export function exportData(query){
  return request({
    url:'/article/lawlist/export',
    method:'get',
    params:query,
    responseType: 'blob'
  })
}
